package zhangcong.controller;

import com.alibaba.fastjson.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import zhangcong.pojo.ZCPojo;
import zhangcong.service.ZCservice;

import javax.annotation.Resource;
import java.util.List;


@Controller
public class ZhangCongController {
   @Resource
   ZCservice zCservice;

    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        List<ZCPojo> list= zCservice.hello();
        return JSONArray.toJSONString(list);
    }
}
